#ifndef __EI_MAI_SMART_PETS_H__
#define __EI_MAI_SMART_PETS_H__

#ifdef __cplusplus
#if __cplusplus
extern "C" {
#endif
#endif


typedef struct eiMADP_SMART_PETS_RESULT_S {
       EI_S32 s32Rect[4]; //objs rect
       // EI_S32 s32Area;
       EI_U64 u64Timestamp;
       EI_S32 s32Class;
	   EI_S32 s32ID;
	   EI_FLOAT f32Score;
} EI_MADP_SMART_PETS_RESULT_S;


typedef struct eiMADP_SMART_PETS_RESULTS_S {
       EI_U32 u32Num;
       EI_U32 u32FrameWidth;
       EI_U32 u32FrameHeight;
       EI_S32 s32FrameId;
       EI_MADP_SMART_PETS_RESULT_S stPetsRect[DEFAULT_NNA_PETS_DET_CONFIG_MAX_DET_CNT];
       //for nna
       EI_U32 NnaHandle;
       EI_NNA_DST_PETS_S stNnaResult;
} EI_MADP_SMART_PETS_RESULTS_S;

typedef struct eiMADP_SMART_PETS_VENC_DATA_S {
	EI_VOID *pVStreamData;
	EI_U8 *pu8Addr;
	EI_U32 au32Len;
} EI_MADP_SMART_PETS_VENC_DATA_S;

typedef struct eiMADP_SMART_PETS_CAP_RESULTS_S {
	EI_MADP_SMART_PETS_RESULTS_S *pstPetsResult;
	// cap frame image
	EI_MADP_SMART_FRAME_S *pstSmartFrame;
} EI_MADP_SMART_PETS_CAP_RESULTS_S;

typedef struct eiMADP_SMART_PETS_VENC_RESULT_S {
	EI_MADP_SMART_PETS_CAP_RESULTS_S *pstSmartCapResults;
	EI_S32 PetIdx;
	EI_U64 u64Timestamp;
} EI_MADP_SMART_PETS_VENC_RESULT_S;


typedef struct eiMADP_SMART_PETS_SNAP_RESULT_S {
	EI_MADP_SMART_PETS_VENC_RESULT_S *pstPetsVencResultData;
	EI_MADP_SMART_PETS_VENC_DATA_S *pstBgVencData;
	EI_MADP_SMART_PETS_VENC_DATA_S *pstVencData;
} EI_MADP_SMART_PETS_SNAP_RESULT_S;

typedef EI_S32 (*PFN_SMART_PETS_DATA_CB)
       (EI_HANDLE hPetsCap, EI_MADP_SMART_FRAME_S *pstSmartFrame,
       EI_MADP_SMART_PETS_RESULTS_S *pstDetResults, EI_VOID *pPrivData);//用户回调接收识别结果


typedef EI_S32 (*PFN_SMART_PETS_SnapDataCB)(EI_HANDLE hPetsCap,
	EI_MADP_SMART_PETS_SNAP_RESULT_S *pstSmartPetsSnapResults, EI_VOID *pPrivData);//用户回调接收抓拍

/** the attribute of smart motion det*/
typedef struct eiMADP_SMART_PETS_CFG_S {
       EI_BOOL bPetsEnable;
       EI_BOOL bPetsDrawBoxEnable;//画框开关
       EI_BOOL bBgEnable;//背景开关
       EI_S32 s32CapMode;//抓拍模式
       EI_S32 s32CapInterval;//抓拍时间戳
       EI_S32 s32CapJpegQuality;
       EI_U32 u32FrameWidth;
       EI_U32 u32FrameHeight;

       EI_S32 s32Sensitive;
       PFN_SMART_PETS_SnapDataCB pfnCapDataCB;
       PFN_SMART_PETS_DATA_CB pfnDataCB;
       EI_VOID *pPrivateData;
} EI_MADP_SMART_PETS_CFG_S;

/** the attribute of smart mbgs cap*/
typedef struct eiMADP_SMART_PETS_ATTR_S {
	/* init attr start*/
	EI_HANDLE Vproc;
	EI_HANDLE Vport;
	EI_HANDLE VencChn;
	EI_HANDLE Det;

	EI_MADP_SMART_PETS_CFG_S smartPetsCfg;
	EI_NNA_PET_CONFIG_S stPetConfig;
} EI_MADP_SMART_PETS_ATTR_S;



#ifdef __cplusplus
#if __cplusplus
}
#endif
#endif

#endif /* __EI_MAI_SMART_PETS_H__ */
